'use strict';
let user = {};
export default class extends think.controller.base {
    /**
     *@description action请求验证用户token
     */
    async __before(action) {
        let userToken = await this.session('token');
        let tokenService = think.service("login");
        let tokenServiceInstance = new tokenService();
        /*let verifyTokenResult = tokenServiceInstance.verifyToken(userToken);
        if (verifyTokenResult === "fail") {
            this.fail("TOKEN_INVALID")
        }
        think.log(verifyTokenResult);
        user = verifyTokenResult.userInfo;*/
    }
    __call() {
        this.fail("NEED_LOGIN");
    }
//用户信息
    userInfo() {
        return user;
    }
}